package com.yn.pet.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yn.pet.bus.entity.AlarmRecord;
import com.yn.pet.bus.entity.GenFenceAlarm;

import java.util.Date;

/**
 * 地理围栏告警记录表(GenFenceAlarm)表服务接口
 *
 * @author makejava
 * @since 2025-07-09 12:00:47
 */
public interface GenFenceAlarmService extends IService<GenFenceAlarm> {


    /**
     * 获取设备围栏告警记录
     * @param deviceId 设备id
     * @param startTime 开始时间区间
     * @param endTime 结束时间区间
     * @return 告警记录数量
     */
    Long getCountByDeviceId(Long deviceId, Date startTime, Date endTime);

    /**
     * 根据围栏id获取该围栏的最新一条的告警记录
     * @param fenceId 围栏id
     * @return 告警记录
     */
    GenFenceAlarm getLastFenceAlarmRecordByFenceId(Long fenceId);
}

